Optimal. Leaf size=61 \[ \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{\sqrt {c} f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {4019, 209}
\begin {gather*} \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a} \sqrt {c+d \sec (e+f x)}}\right )}{\sqrt {c} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 4019
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {c+d \sec (e+f x)}} \, dx &=-\frac {(2 a) \text {Subst}\left (\int \frac {1}{1+a c x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{\sqrt {c} f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 102, normalized size = 1.67 \begin {gather*} \frac {\sqrt {2} \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {c} \sin \left (\frac {1}{2} (e+f x)\right )}{\sqrt {d+c \cos (e+f x)}}\right ) \sqrt {d+c \cos (e+f x)} \sec \left (\frac {1}{2} (e+f x)\right ) \sqrt {a (1+\sec (e+f x))}}{\sqrt {c} f \sqrt {c+d \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(188\) vs.
\(2(49)=98\).
time = 2.13, size = 189, normalized size = 3.10
method | result | size |
default | \(-\frac {2 \sqrt {\frac {d +c \cos \left (f x +e \right )}{\cos \left (f x +e \right )}}\, \cos \left (f x +e \right ) \left (-1+\cos \left (f x +e \right )\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \arctan \left (\frac {\left (-1+\cos \left (f x +e \right )\right ) \left (c -d \right )^{2} c \sqrt {2}}{\sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {-\left (c -d \right )^{4} c}}\right ) \sqrt {2}\, \sqrt {-\left (c -d \right )^{4} c}}{f \sin \left (f x +e \right )^{2} \sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, \left (c^{2}-2 c d +d^{2}\right ) c}\) | \(189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.62, size = 221, normalized size = 3.62 \begin {gather*} \left [\frac {\sqrt {-\frac {a}{c}} \log \left (-\frac {2 \, c \sqrt {-\frac {a}{c}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a c \cos \left (f x + e\right )^{2} + a c - a d - {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{f}, -\frac {2 \, \sqrt {\frac {a}{c}} \arctan \left (\frac {\sqrt {\frac {a}{c}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a \sin \left (f x + e\right )}\right )}{f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )}}{\sqrt {c + d \sec {\left (e + f x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}}{\sqrt {c+\frac {d}{\cos \left (e+f\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________